package com.xbs.controller.hitchhiking;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbs.controller.base.BaseServlet;
import com.xbs.entity.CommonOrderEntity;
import com.xbs.entity.EmployeeEntity;
import com.xbs.service.hitchhiking.EmpAdminService;
import com.xbs.service.hitchhiking.HitchOrderAdminService;

/**
 * 预定成功之后修改顺风车订单
 * @author dell
 */
@WebServlet("/backstage/xghoa")
public class XgHitchOrderAdminServlet extends BaseServlet{
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		/**
		 * 根据订单编号来修改信息
		 */
		HitchOrderAdminService hoas = new HitchOrderAdminService();
		CommonOrderEntity coe = new CommonOrderEntity();
		coe.setCo_id(req.getParameter("ddbh"));
		coe.setCo_order_status(req.getParameter("ddzt"));
		coe.setCo_car_type(req.getParameter("cxmc"));
		coe.setCo_car_id(req.getParameter("cph"));
		coe.setCo_remark(req.getParameter("cbz"));
		coe.setCo_get_operator(req.getParameter("copater"));
		int row = hoas.updateOrderByGet(coe);
		redirect("/backstage/hitchhikingOrder");
	}
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
}
